/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyComparator;

import java.util.Comparator;
import java.util.Map;

/**
 *
 * @author yichao/yilin
 */


public class CompareInt implements Comparator<Object>{

	public int compare(Object obj1, Object obj2){
		int result=0;
		Map.Entry e1 = (Map.Entry)obj1 ;
		Map.Entry e2 = (Map.Entry)obj2 ;

		Integer value1 = (Integer)e1.getValue();
		Integer value2 = (Integer)e2.getValue();

		result=value2.compareTo( value1 );
		return result;
	}
}
